package com.doucat.piano;

import android.os.Bundle;

import com.doucat.piano.main.PianoFragment;
import com.doucat.support.component.activity.BaseActivity;
import com.doucat.support.component.start.StarterBuild;

public class MainActivity extends BaseActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        runOnThread(new Runnable() {
            @Override
            public void run() {
                print("RANGE="+Const.RANGE.length);
                print("WHITE_KEY_CODE="+Const.WHITE_KEY_CODE.length);
                print("GAPS="+Const.GAPS.length);
                print("BLACK_KEY_CODE="+Const.BLACK_KEY_CODE.length);
                SoundPlayUtils.getInstance(getContext());
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        new StarterBuild()
                                .setContext(getContext())
                                .setType(StarterBuild.START_HOST_ACTIVITY)
                                .setBundle(new Bundle())
                                .create()
                                .start(PianoFragment.class);
                        finish();
                    }
                });
            }
        });
    }
}